﻿CREATE PROCEDURE [dbo].[QuoteLineItemInsert_SP] 
@QuoteID int, 
@LineItem int, 
@QuoteSailTypeID int, 
@Luff float, 
@LporFoot float, 
@InputArea float, 
@GenericYarnID int, 
@BoatSpeed float, 
@AWS int, 
@DPIID int,
@CurrencyID int,
@Discount float, 
@TierID int, 
@UsageID int, 
@CreateDate nvarchar(50), 
@ConstructionID int, 
@Price float, 
@SailModelCode nvarchar(50), 
@Cut nvarchar(50), 
@Weight nvarchar(50), 
@NotionalArea bit, 
@AccessoryID int,
@FilmTypeID int,
@Multiple int,
@TotalPrice float,
@PreDiscountPrice float,
@SailNumber nvarchar(50),
@SailNumberColourID int,
@NylonColourDetails int,
@AccessoryColourID float,
@FixedOfferPrice float,
@ExRate float,
@AccessAttachlineItem int,
@OptionTotal float,
@BillingDiscount float,
@OEMSailListID int,
@OriginatingOEMSailListID int,
@COM float,
@DesignFile nvarchar(50),
@Notes nvarchar(max),
@NotArea float,
@DeliveryDate datetime,
@DepartmentID int,
@AttachedToLineItem int,
@HasAttachment bit,
@PreviousQuoteLineItemID int,
@SailMeasurementID int,
@OfferIncVat bit,
@LocaleID int,
@BRP float,
@FabricID int,
@NewBRP float,
@TopSurfaceID int,
@BotSurfaceID int,
@AccessoryItemID int,
@DKKPrice float,
@TotalOfferedPrice float,
@MarketPriceEuro float,
@MarketRetailPRice float,
@SeasonalPriceEuro float,
@SeasonalPriceCurr float,
@BillingPrice float,
@BillingCurrency nvarchar(50),
@AXItem nvarchar(50),
@DelDate datetime,
@ConvertToOrder bit
AS

	SET NOCOUNT ON;

BEGIN
	

			INSERT INTO QuoteLineItem_Tbl (QuoteID, LineItem, QuoteSailTypeID, Luff, LporFoot, 
InputArea, GenericYarnID, BoatSpeed, AWS, FilmTypeID, DPIID, CurrencyID, Discount, TierID, UsageID, 
CreateDate, ConstructionID, Price, SailModelCode, Cut, Weight, Multiple, TotalPrice, TotalOfferedPrice, 
AccessoryID, PreDiscountPrice, SailNumber, SailNumberColourID, AccessoryColourID, NylonColourDetails, 
FixedOfferPrice, BRP, ExRate, FabricID, NewBRP, NotionalArea, AccessAttachLineItem, TopSurfaceID, BotSurfaceID, 
AccessoryItemID, DKKPrice, MarketPriceEuro, MarketRetailPrice, SeasonalPriceEuro, SeasonalPriceCurr, 
OptionTotal, BillingPrice, BillingDiscount, BillingCurrency, OEMSailListID, OriginatingOEMSailListID, COM, 
DesignFile, AxItem, Notes, NotArea, DeliveryDate, DepartmentID, LocaleID, AttachedToLineItem, HasAttachment, 
PreviousQuoteLineItemID, SailMeasurementID, OfferIncVat, ConvertToOrder) 
VALUES
 (@QuoteID, @LineItem, @QuoteSailTypeID, @Luff, @LporFoot, @InputArea, @GenericYarnID, @BoatSpeed, @AWS, 
@FilmTypeID, @DPIID, @CurrencyID, @Discount, @TierID, @UsageID, @CreateDate, @ConstructionID, @Price, @SailModelCode, 
@Cut, @Weight,  @Multiple, @TotalPrice, @TotalOfferedPrice, @AccessoryID, @PreDiscountPrice, @SailNumber, 
@SailNumberColourID, @AccessoryColourID, @NylonColourDetails, @FixedOfferPrice, @BRP, @ExRate, @FabricID, @NewBRP, 
@NotionalArea, @AccessAttachLineItem, @TopSurfaceID, @BotSurfaceID, @AccessoryItemID, @DKKPrice, @MarketPriceEuro, 
@MarketRetailPrice, @SeasonalPriceEuro, @SeasonalPriceCurr, @OptionTotal, @BillingPrice, @BillingDiscount, 
@BillingCurrency, @OEMSailListID, @OriginatingOEMSailListID, @COM, @DesignFile, @AxItem, @Notes, @NotArea, 
@DeliveryDate, @DepartmentID, @LocaleID, @AttachedToLineItem, @HasAttachment, @PreviousQuoteLineItemID, 
@SailMeasurementID, @OfferIncVat, @ConvertToOrder)

END